<% content_for :sidebar do %>
  <% @sidebar_title = "Filtrování výrobků" %>

  <%= form_for([:admin, @search]) do |f| %>
  <table>
    <tbody>
      <tr>
        <th><%= f.label :presentation_contains, "Jméno výrobku" %></th>
      </tr>
      <tr>
        <td><%= f.text_field :presentation_contains %></td>
      </tr>
      <tr>
        <th><%= f.label :master_number_contains, "Číslo výrobku" %></th>
      </tr>
      <tr>
        <td><%= f.text_field :master_number_contains %></td>
      </tr>
      <tr>
        <th><%= f.label :state_in, "V prodeji" %></th>
      </tr>
      <tr>
        <th><%= f.checks :state_in,
              [
                [t("enumerations.product.state.on_sale"), "on_sale"],
                [t("enumerations.product.state.not_on_sale"), "not_on_sale"],
                [t("enumerations.product.state.hidden"), "hidden"],
                [t("enumerations.product.state.deleted"), "deleted"]
              ] do |checkbox| %>
            <p><%= checkbox.box %>&nbsp;<%= checkbox.label %></p>
          <% end %>
        </th>
      </tr>
      <tr>
        <td><%= button_to_search "Filtrovat" %></td>
      </tr>
    </tbody>
  </table>
  <% end %>
<% end %>